home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 1
/
SPACE - Library 1 - Volume 1.iso
/
program
/
441
/
dlibs12
/
sprintf.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-11-23
|
541b
|
34 lines
#include <stdarg.h>
static unsigned int sputc(c, s)
char c, **s;
{
return(*(*s)++ = c);
}
sprintf(buf, fmt, arg)
char *buf;
char *fmt;
int arg;
{
register int n;
register char *p = buf;
n = _printf(&buf, sputc, fmt, &arg);
p[n] = '\0'; /* always tie of the string */
return(n);
}
vsprintf(buf, fmt, args)
char *buf;
char *fmt;
va_list args;
{
register int n;
register char *p = buf;
n = _printf(&buf, sputc, fmt, args);
p[n] = '\0'; /* always tie of the string */
return(n);
}